package com.wooshow.base.spring;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.wooshow.base.biz.SayHello;
import com.wooshow.base.struts.FromSpringAction;

public class HelloSpringController implements Controller {

	private static Log log = LogFactory.getLog(FromSpringAction.class);
	
	private String successView;
	
	private SayHello sayHello;
	
	public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse res) throws Exception {
		log.info(sayHello.sayHello(HelloSpringController.class));
	    return new ModelAndView(getSuccessView());
    }

	public String getSuccessView() {
    	return successView;
    }

	public void setSuccessView(String successView) {
    	this.successView = successView;
    }

	public SayHello getSayHello() {
    	return sayHello;
    }

	public void setSayHello(SayHello sayHello) {
    	this.sayHello = sayHello;
    }

}
